<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<style>
<!--
.page{
	padding-top:30px;
	width:80%;
	margin:0 auto;
	overflow:hidden;
	margin-bottom:20px;
}

.page div.page_button{
	display:block;
	width:100px;
	height:30px;
	line-height:30px;
	text-align:center;
	border:1px solid #ddd;
	background: url('catalog/view/theme/mobile/image/box.png') repeat-x;
	-webkit-border-radius: 7px 7px 7px 7px;
	-moz-border-radius: 7px 7px 7px 7px;
	-khtml-border-radius: 7px 7px 7px 7px;
	border-radius: 7px 7px 7px 7px;
}

.page_button a {
	display:block;
	line-height:30px;
	text-decoration: none;
	color:#ffffff;
}

.page_next{
	margin-right:20px;
}

table.form tr td:first-child {
	width: 80px;
}

table.form tr td input ,table.form tr td select{
	border:1px solid #4f5aa4;
	-webkit-border-radius: 4px 4px 4px 4px;
	-moz-border-radius: 4px 4px 4px 4px;
	-khtml-border-radius: 4px 4px 4px 4px;
	border-radius: 4px 4px 4px 4px;
}


table.form tr td{
	color: #4f5aa4;
	font-size:14px;
}


.advice_info>.advice_head {
	background: url('catalog/view/theme/mobile/image/box_gray.png') repeat-x !important;
}

.advice_info>.advice_head h2 {
	color:#333333 !important;
}


.advice_info>.advice_head {
	border: 1px solid #DDD !important;
}
-->
</style>

<script type="text/javascript">
<!--

$(document).ready(function(){
  $('#create').bind('click',function(){
		var card_no = $('#card_no').val();
		var bussness_type_id = $('#bussness_type_id').val();
		if(card_no==null||card_no==''){
			alert('请输入身份证号');
			return ;
		}
		if(bussness_type_id==null||bussness_type_id==''){
			alert('请选择预约类型');
			return ;
		}

		$.ajax({
			url: 'index.php?route=message/order/check&filter_card_no=' +  $('#card_no').val()+"&bussness_type_id="+$('#bussness_type_id').val(),
			dataType: 'json',
			success: function(json) {
				if(json['result']=='success'){
					$('#form').submit();
				}else{
					alert('今天已近预约过相同业务');
				}
			}
		});
		
	});
});
//-->
</script>
<div class="box" >
	<div id="content">
	<?php echo $content_top; ?>
		<div >
			<div class="advice_info">
			<div class="advice_head"><h2>预约创建服务</h2></div>
				    	<div class="logo">
				<img src="catalog/view/theme/mobile/image/xj/yijing/fengcai_header.jpg" width="100%" />
			</div>
				    <div class="advice_content">
				    		    <div class="page">  
	  			<div class="page_button page_pre right">
	  				 <a id="create" ><?php echo '创建预约'; ?></a>
	  			</div>
	  			<div class="page_button page_next right">
	  				<a href="<?php echo $before;?>"  ><?php echo '返回'; ?></a>
	  			</div>
	  	</div>
				    
					<form action="<?php echo $next;?>" method="post"
						enctype="multipart/form-data" id="form">
						<table class="form" >
							<tr>
								<td>身份证号：<span style="color:red">*</span></td>
								<td><input type="text" name="card_no" id="card_no"/></td>
							</tr>
							
							<tr>
								<td>类型</td>
								<td><select name="bussness_type_id" id="bussness_type_id" style="width:180px;height:40px;">
									<option value="">请选择....</option>
									<?php foreach ($bussnesss as $bussness) { ?>
										<option value="<?php echo $bussness['bussness_type_id']?>"><?php echo $bussness['type_name'];?></option>
									<?php }?>
								</select></td>
							</tr>
							
							<tr>
								<td >预约描述：<span style="color:red">*</span></td>
								<td><textarea  name="content" cols="20" rows="5"  placeholder="户籍查询请填写查询内容,其它可不填" ></textarea>
							</tr>
						</table>
					</form>
					</div>
				</div>
			
		</div>

	</div>
	<?php echo $content_bottom; ?>
</div>

<?php echo $footer;?>

